package com.example.web;

import com.example.core.annotation.CacheLock;
import com.example.core.annotation.CacheParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 胡成
 * @Version: 0.0.1V
 * @Date: 2019/2/2
 * @Description: 类描述
 **/
@RestController
public class LockController {
    @CacheLock(prefix = "test")
    @GetMapping("/test")
    public String query(@CacheParam(name = "token") @RequestParam String token) {
        return "success - " + token;
    }


}
